Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI panel: make code patches human readable (remove diff notation, add diff colors) #2318

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jurgenwerk
Copy link
Contributor

@jurgenwerk jurgenwerk commented Mar 21, 2025

Removes the <<<<<<< SEARCH ... ======= ... >>>>>>> REPLACE notation from the code displayed in the AI panel monaco editor, and adds red/green line decoration to the diffs.

Before:
image

After:

output

Copy link

github-actions bot commented Mar 21, 2025

Host Test Results

  1 files  ±0    1 suites  ±0   26m 31s ⏱️ -41s
847 tests +9  842 ✅ +9  5 💤 ±0  0 ❌ ±0 
854 runs  +9  849 ✅ +9  5 💤 ±0  0 ❌ ±0 

Results for commit 42b6dca. ± Comparison against base commit 8f048e3.

♻️ This comment has been updated with latest results.

@jurgenwerk jurgenwerk changed the title Render search/replace as decorated code diff (red, green) AI panel: make code patches more human readable (remove diffing notation, add diff colors) Mar 21, 2025
@jurgenwerk jurgenwerk changed the title AI panel: make code patches more human readable (remove diffing notation, add diff colors) AI panel: make code patches human readable (remove diffing notation, add diff colors) Mar 21, 2025
@jurgenwerk jurgenwerk changed the title AI panel: make code patches human readable (remove diffing notation, add diff colors) AI panel: make code patches human readable (remove diff notation, add diff colors) Mar 21, 2025
@jurgenwerk jurgenwerk marked this pull request as ready for review March 21, 2025 10:42
@jurgenwerk jurgenwerk requested a review from a team March 21, 2025 11:12
@burieberry burieberry requested a review from a team March 21, 2025 14:12
Copy link
Contributor

@backspace backspace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v cool!

hello-world gts in feb11 2025-03-21 13-00-36

@jurgenwerk
Copy link
Contributor Author

jurgenwerk commented Mar 24, 2025

Based on our meeting today there will be changes needed here:

  1. LLM should generate a search/replace for a single file (currently it will generate multiple search/replace blocks for a single file)
  2. During streaming, continuously apply the search/replace and get the diff out and displayed. There will be a challenge of how/what to display during streaming before we get to the replace part
  3. Visualize the replaced parts of the content by additionally decorating the changed part of the line

Like this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants